<?php
// 全局路径
define('__SYS_ROOT_PATH__'	, dirname(__FILE__).'/'	);
// 组件配置文件
define( '__SYS_ENV__','.php');
define( '__SYS_PARAM_PATH__' , __SYS_ROOT_PATH__ . 'param/' );
// 类库路径
define('__SYS_LIB_PATH__'	, __SYS_ROOT_PATH__.'/library/'	); 
// 应用路径
define('__SYS_APP_PATH__'	, __SYS_ROOT_PATH__.'/application/'	); 
// 上传路径
define('__SYS_UPLOAD_PATH__',__SYS_ROOT_PATH__.'webroot/upload/');

include(__SYS_PARAM_PATH__.'global'.__SYS_ENV__);

@date_default_timezone_set(__SYS_SET_TIMEZONE__);
if(!isset($_SERVER[__SYS_GLOBAL_SERVER__]))
{
	$_SERVER[__SYS_GLOBAL_SERVER__]  = array(
										'comp'=>array(
												'mysql'		=> @include(__SYS_PARAM_PATH__.'mysql'.__SYS_ENV__),
												'redis' 	=> @include(__SYS_PARAM_PATH__.'redis'.__SYS_ENV__),
												'memcached'	=> @include(__SYS_PARAM_PATH__.'memcached'.__SYS_ENV__),
												'mongodb'	=> @include(__SYS_PARAM_PATH__.'mongo'.__SYS_ENV__),
												),
										// 邮件分发使用
										'email'	=> @include(__SYS_PARAM_PATH__.'email'.__SYS_ENV__),
										);
}else{
	$_SERVER[__SYS_GLOBAL_SERVER__] =  json_decode( $_SERVER[__SYS_GLOBAL_SERVER__] , 1 );
}



